﻿@{
    ViewData["Title"] = "身份认证";
}
@section style{
    <link href="~/css/index.css" rel="stylesheet" type="text/css" />
}
@section script{
    <script>
        var vm = new Vue({
            el: '#v-box',
            data: {
                account: '',
                password: ''
            },
            methods: {
                onSubmit() {
                    let data = {
                        account: this.account,
                        password: this.password
                    }
                    $.post('/Home/Verify', data, res => {
                        console.log(res)
                        if (res.state) {
                            window.location = res.data
                        } else {
                            alay.msg(res.msg)
                        }
                    })
                }
            }
        })
    </script>
}
<div class="box" @@keyup.enter="onSubmit" id="v-box">
    <h2>身份验证</h2>
    <input type="text" v-model="account" placeholder="请输入账号" />
    <input type="password" v-model="password" placeholder="请输入密码" />
    <a class="btn btn-primary btn-anti btn-loading" @@click.stop="onSubmit">登录</a>
</div>
